package org.example.static_block;

import org.junit.Test;

public class Test01 {
    @Test
    public void test () {
        TestDemo.test();
        TestDemo testDemo = new TestDemo();
    }
}

class TestDemo {
    static {
        System.out.println("静态代码块");
    }
    {
        System.out.println("非静态代码块");
    }

    public static void test () {
        System.out.println("静态方法");
        {
            System.out.println("静态方法中的代码块");
        }
    }
}